package cn.mrlong.contactutils;

import android.provider.CallLog;

public enum CallTypeEnum {
    INCOMING_TYPE(1), // 来电，字体蓝色
    OUTGOING_TYPE(2), // 去电，字体绿色
    MISSED_TYPE(3),;// 未接，字体红色

    private int type;

    public static CallTypeEnum getCallTypeByCode(int code) {
        for (CallTypeEnum type : CallTypeEnum.values()) {
            if (type.getType() == code) {
                return type;
            }
        }
        return null;
    }

    private CallTypeEnum(int type) {
        this.type = type;
    }

    public int getType() {
        return type;
    }
}
